package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TicketMovieYearMapper;
import com.ruoyi.system.domain.TicketMovieYear;
import com.ruoyi.system.service.ITicketMovieYearService;
import com.ruoyi.common.core.text.Convert;

/**
 * 电影年份信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-10
 */
@Service
public class TicketMovieYearServiceImpl implements ITicketMovieYearService 
{
    @Autowired
    private TicketMovieYearMapper ticketMovieYearMapper;

    /**
     * 查询电影年份信息
     * 
     * @param id 电影年份信息主键
     * @return 电影年份信息
     */
    @Override
    public TicketMovieYear selectTicketMovieYearById(Long id)
    {
        return ticketMovieYearMapper.selectTicketMovieYearById(id);
    }

    /**
     * 查询电影年份信息列表
     * 
     * @param ticketMovieYear 电影年份信息
     * @return 电影年份信息
     */
    @Override
    public List<TicketMovieYear> selectTicketMovieYearList(TicketMovieYear ticketMovieYear)
    {
        return ticketMovieYearMapper.selectTicketMovieYearList(ticketMovieYear);
    }

    /**
     * 新增电影年份信息
     * 
     * @param ticketMovieYear 电影年份信息
     * @return 结果
     */
    @Override
    public int insertTicketMovieYear(TicketMovieYear ticketMovieYear)
    {
        return ticketMovieYearMapper.insertTicketMovieYear(ticketMovieYear);
    }

    /**
     * 修改电影年份信息
     * 
     * @param ticketMovieYear 电影年份信息
     * @return 结果
     */
    @Override
    public int updateTicketMovieYear(TicketMovieYear ticketMovieYear)
    {
        return ticketMovieYearMapper.updateTicketMovieYear(ticketMovieYear);
    }

    /**
     * 批量删除电影年份信息
     * 
     * @param ids 需要删除的电影年份信息主键
     * @return 结果
     */
    @Override
    public int deleteTicketMovieYearByIds(String ids)
    {
        return ticketMovieYearMapper.deleteTicketMovieYearByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除电影年份信息信息
     * 
     * @param id 电影年份信息主键
     * @return 结果
     */
    @Override
    public int deleteTicketMovieYearById(Long id)
    {
        return ticketMovieYearMapper.deleteTicketMovieYearById(id);
    }
}
